package top.shiyiri.shops.controller;

import com.alibaba.fastjson.JSONObject;
import top.shiyiri.shops.bean.ProUsersTop3;
import top.shiyiri.shops.service.ProUsersTop3Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author Aunean
 * @date 2021/12/29
 */
@Controller
public class ProUsersTop3Controller {

    @Autowired
    ProUsersTop3Service service;

    @RequestMapping("/proUsersTop3")
    @ResponseBody
    public String proUsersTop3() {

        List<ProUsersTop3> list = service.proUsersTop3();

        return JSONObject.toJSONString(list);
    }
}
